home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DEMO_VGA
/
FRSTM1.LZH
/
ATILINE.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-03-26
|
1KB
|
71 lines
_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:_TEXT
; void far ATIxorHorLine(int x, int y, int Increment, int Length)
x equ WORD PTR [bp + 6]
y equ WORD PTR [bp + 8]
Increment equ WORD PTR [bp + 10]
Length equ WORD PTR [bp + 12]
BPL equ WORD PTR [bp + 14]
; Local variables
Plane equ WORD PTR [bp - 2]
LastLocal equ 2
extrn _SetATIPlane:FAR, _LineColor:BYTE
PUBLIC _ATIxorLine
_ATIxorLine PROC FAR
push bp
mov bp, sp
sub sp, LastLocal
push es
push di
mov ax, y
mov bx, BPL
mul bx
add ax, x
adc dx, 0
push ax
mov Plane, dx
push dx
call _SetATIPlane
pop dx
pop di
mov ax, 0a000h
mov es, ax
mov al, _LineColor
mov cx, Length
NextPixel:
xor es:[di], al
add di, Increment
jnc CheckLoop
inc Plane
push ax
push di
push es
push cx
push Plane
call _SetATIPlane
pop Plane
pop cx
pop es
pop di
pop ax
CheckLoop:
loop NextPixel
pop di
pop es
mov sp, bp
pop bp
ret
_ATIxorLine ENDP
_TEXT ENDS
END